# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.MerchantAPI.Reports_v1beta.Model.ReportRow do
  @moduledoc """
  Result row returned from the search query. Only the message corresponding to the queried table is populated in the response. Within the populated message, only the fields requested explicitly in the query are populated.

  ## Attributes

  *   `bestSellersBrandView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.BestSellersBrandView.t`, *default:* `nil`) - Fields available for query in `best_sellers_brand_view` table.
  *   `bestSellersProductClusterView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.BestSellersProductClusterView.t`, *default:* `nil`) - Fields available for query in `best_sellers_product_cluster_view` table.
  *   `competitiveVisibilityBenchmarkView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityBenchmarkView.t`, *default:* `nil`) - Fields available for query in `competitive_visibility_benchmark_view` table.
  *   `competitiveVisibilityCompetitorView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityCompetitorView.t`, *default:* `nil`) - Fields available for query in `competitive_visibility_competitor_view` table.
  *   `competitiveVisibilityTopMerchantView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityTopMerchantView.t`, *default:* `nil`) - Fields available for query in `competitive_visibility_top_merchant_view` table.
  *   `nonProductPerformanceView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.NonProductPerformanceView.t`, *default:* `nil`) - Fields available for query in `non_product_performance_view` table.
  *   `priceCompetitivenessProductView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.PriceCompetitivenessProductView.t`, *default:* `nil`) - Fields available for query in `price_competitiveness_product_view` table.
  *   `priceInsightsProductView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.PriceInsightsProductView.t`, *default:* `nil`) - Fields available for query in `price_insights_product_view` table.
  *   `productPerformanceView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.ProductPerformanceView.t`, *default:* `nil`) - Fields available for query in `product_performance_view` table.
  *   `productView` (*type:* `GoogleApi.MerchantAPI.Reports_v1beta.Model.ProductView.t`, *default:* `nil`) - Fields available for query in `product_view` table.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bestSellersBrandView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.BestSellersBrandView.t() | nil,
          :bestSellersProductClusterView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.BestSellersProductClusterView.t() | nil,
          :competitiveVisibilityBenchmarkView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityBenchmarkView.t()
            | nil,
          :competitiveVisibilityCompetitorView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityCompetitorView.t()
            | nil,
          :competitiveVisibilityTopMerchantView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityTopMerchantView.t()
            | nil,
          :nonProductPerformanceView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.NonProductPerformanceView.t() | nil,
          :priceCompetitivenessProductView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.PriceCompetitivenessProductView.t() | nil,
          :priceInsightsProductView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.PriceInsightsProductView.t() | nil,
          :productPerformanceView =>
            GoogleApi.MerchantAPI.Reports_v1beta.Model.ProductPerformanceView.t() | nil,
          :productView => GoogleApi.MerchantAPI.Reports_v1beta.Model.ProductView.t() | nil
        }

  field(:bestSellersBrandView, as: GoogleApi.MerchantAPI.Reports_v1beta.Model.BestSellersBrandView)

  field(:bestSellersProductClusterView,
    as: GoogleApi.MerchantAPI.Reports_v1beta.Model.BestSellersProductClusterView
  )

  field(:competitiveVisibilityBenchmarkView,
    as: GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityBenchmarkView
  )

  field(:competitiveVisibilityCompetitorView,
    as: GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityCompetitorView
  )

  field(:competitiveVisibilityTopMerchantView,
    as: GoogleApi.MerchantAPI.Reports_v1beta.Model.CompetitiveVisibilityTopMerchantView
  )

  field(:nonProductPerformanceView,
    as: GoogleApi.MerchantAPI.Reports_v1beta.Model.NonProductPerformanceView
  )

  field(:priceCompetitivenessProductView,
    as: GoogleApi.MerchantAPI.Reports_v1beta.Model.PriceCompetitivenessProductView
  )

  field(:priceInsightsProductView,
    as: GoogleApi.MerchantAPI.Reports_v1beta.Model.PriceInsightsProductView
  )

  field(:productPerformanceView,
    as: GoogleApi.MerchantAPI.Reports_v1beta.Model.ProductPerformanceView
  )

  field(:productView, as: GoogleApi.MerchantAPI.Reports_v1beta.Model.ProductView)
end

defimpl Poison.Decoder, for: GoogleApi.MerchantAPI.Reports_v1beta.Model.ReportRow do
  def decode(value, options) do
    GoogleApi.MerchantAPI.Reports_v1beta.Model.ReportRow.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.MerchantAPI.Reports_v1beta.Model.ReportRow do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
